package cn.kgc.exception.Work03;

import java.util.Scanner;

public class UserViewRealize implements UserView {
    @Override
    public void login() {
        Uses choose=new Uses();
        Scanner input = new Scanner(System.in);
        System.out.println("请输入用户名：");
        String name = input.nextLine();
        System.out.println("请输入密码:");
        String password = input.nextLine();
         choose.login(name, password);
    }

    @Override
    public void register() {
        Uses choose = new Uses();
        Scanner input = new Scanner(System.in);
        System.out.println("请输入用户名：");
        String name = input.nextLine();
        System.out.println("请输入您的邮箱：");
        String email = input.nextLine();
        System.out.println("请输入密码：");
        String password = input.nextLine();
        System.out.println("请再次输入密码:");
        String rePassword = input.nextLine();
        choose.register(name, password, rePassword, name, email);
    }
}
